Python Package Manager
· One min read
Python 的 Deployment 真的很複雜(Python version, Package dependence, Package install method 等問題),做成越來越多的工具想解決這個問題,Rye 的 Doc 有詳細說明 Python 的 Package Management / Version / Resolver 問題
Show which python is using
python -c "import sys; print(sys.prefix)"
PDM
- Personal recommended
- Support
pnpmliked cache link - Support standard
pyproject.toml - PDM use system python
Enable pnpm liked cache
pdm config install.cache on
UV
- Extremely fast, 10~100x faster than
pip - Manage Python versions
- Not compatible with some package
- Support standard
pyproject.toml - Written in Rust
Rye
- Built by Rye (The creator of the Flask)
- Manage Python versions
- Use Python Standalone Builds
- Rye replace
pythoncommand to auto use the specified version of.python-version - Rye does not have
pipcommand - Rye uses
uvto manage dependencies - Support standard
pyproject.toml - Written in Rust
Set Python version of project
# rye pin <version>
rye pin 3.10
Install package dependencies of pyproject.toml
rye sync